home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PASCAL / 1463.ZIP / DRAW-2D.ARC / DRAW2D.DOC < prev    next >
Text File  |  1987-06-13  |  21KB  |  536 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.                       CPCUG 1987 SOFTWARE PROGRAMMING CONTEST
  11.  
  12.  
  13.  
  14.                        DRAW-2D: A 2-D GRAPHICS EDITOR   V4.0
  15.  
  16.                                    USER'S GUIDE
  17.  
  18.                            SUBMITTED BY:   David J. Powers
  19.                                            190 Timber
  20.                                            Marquette, Mich  49855
  21.                                            (906) 249-3205
  22.  
  23.  
  24.  
  25.                                    June 10, 1987
  26.  
  27.  
  28.  
  29.  
  30.          *************************************************************
  31.          *                                                           *
  32.          *   Permission is granted for Capital PC and other          *
  33.          *                                                           *
  34.          *   not-for-profit organizations to distribute the source   *
  35.          *                                                           *
  36.          *   and executable portions of the program DRAW-2D.         *
  37.          *                                                           *
  38.          *************************************************************
  39.  
  40.  
  41.  
  42.       DRAW-2D: A 2-D GRAPHICS EDITOR                            Page 2
  43.  
  44.  
  45.  
  46.  
  47.  
  48.                                TABLE OF CONTENTS
  49.  
  50.  
  51.         1.0     INTRODUCTION
  52.  
  53.         2.0     SYSTEM REQUIREMENTS
  54.  
  55.         3.0     INSTALLATION
  56.  
  57.         4.0     PROGRAM CONVENTIONS
  58.  
  59.         5.0     GRAPHIC OBJECTS
  60.  
  61.         6.0     GRAPHIC OPERATIONS
  62.  
  63.         7.0     UTILITY OPERATIONS
  64.  
  65.         8.0     CONFIGURATION OPTIONS
  66.  
  67.         9.0     MAKING CHANGES AND RE-COMPILING DRAW-2D
  68.  
  69.        10.0     PROGRAM LIMITATIONS & FUTURE ENHANCEMENTS
  70.  
  71.  
  72.  
  73.  
  74.       DRAW-2D: A 2-D GRAPHICS EDITOR                            Page 3
  75.  
  76.  
  77.         1.0     INTRODUCTION
  78.  
  79.                 DRAW-2D is an easy to use, yet effective, 2-D graphics
  80.                 editor program.  The goal of this software is to
  81.                 provide the same type of editing functions for
  82.                 graphic objects as is normally found in text
  83.                 editor programs dealing with words.  Due to the
  84.                 inherent difference in graphic objects and text
  85.                 objects, some functions unique to graphics are
  86.                 included in this software.  DRAW-2D is limited in
  87.                 scope to dealing only with graphic objects.  No
  88.                 text or word processing capabilities are included.
  89.  
  90.  
  91.         2.0     SYSTEM REQUIREMENTS
  92.  
  93.                 DRAW-2D will run on any IBM-PC/XT/AT or strict
  94.                 compatible with:
  95.  
  96.                         o 128K of memory
  97.                         o at least one 160K floppy disk
  98.                         o CGA (color graphics adapter) board
  99.                           with either an RGB or composite monitor
  100.                         o Serial port for mouse input device
  101.                         o Microsoft Mouse or compatible
  102.                         o DOS V2.0 or higher
  103.  
  104.                 Optional hardware:
  105.                         o Epson or compatible printer for graphics output
  106.                         o Math Co-processor for faster calculations
  107.  
  108.  
  109.         3.0     INSTALLATION
  110.  
  111.                 The following files are supplied with this software:
  112.  
  113.                         DRAW2D.DOC      --  documentation file
  114.                         DRAW2D.COM      --  2-D graphics editor
  115.                         DRAW2DM.COM     --  2-D graphics editor with
  116.                                             Math Co-processor support
  117.                         DRAW2D.HDR      --  program header
  118.                         DRAW.BAT        --  execution Batch file
  119.                         *.PAS           --  Turbo Pascal source files
  120.  
  121.                 Merely copy these files to a floppy or hard disk.  The
  122.                 following files must also reside on your working disk:
  123.  
  124.                         GRAPHICS.COM    -- DOS resident graphics print
  125.                                            screen utility
  126.                         MOUSE.COM       -- resident Microsoft Serial
  127.                                              Mouse driver
  128.                         MODE.COM        -- DOS utility
  129.  
  130.  
  131.  
  132.  
  133.       DRAW-2D: A 2-D GRAPHICS EDITOR                            Page 4
  134.  
  135.  
  136.         3.0     INSTALLATION (continued)
  137.  
  138.                 To start the program, enter the following commands
  139.                 at the DOS prompt,
  140.  
  141.                         >MODE BW80
  142.                         >GRAPHICS       (to load resident print utility)
  143.                         >MOUSE          (to load resident Mouse driver)
  144.                         >DRAW2D         (or DRAW2DM if you have Math
  145.                                             Co-processor)
  146.  
  147.                  or use the Batch file 'DRAW.BAT'
  148.  
  149.                         >DRAW
  150.  
  151.  
  152.  
  153.  
  154.       DRAW-2D: A 2-D GRAPHICS EDITOR                            Page 5
  155.  
  156.  
  157.         4.0     PROGRAM CONVENTIONS
  158.  
  159.  
  160.         4.1     TERMINAL BELL
  161.  
  162.                 The beeping of the terminal is used to indicate
  163.                 one of two conditions:
  164.  
  165.                         o  a prompt for user input
  166.                         o  an error condition
  167.  
  168.                 The terminal bell can be suppressed during user
  169.                 prompts by turning the BELL off through the
  170.                 CONFIG Sub-menu.  There is no way to suppress the
  171.                 bell for error conditions.  In fact, if no more
  172.                 free space is available in memory for objects,
  173.                 the bell will sound continuously while the cursor
  174.                 is in the graphic area.
  175.  
  176.  
  177.         4.2     SCREEN AREAS
  178.  
  179.                 The monitor screen is divided up into three distinct
  180.                 areas:
  181.                         o  The first 20 lines are used as the
  182.                            graphics display window.  In this area,
  183.                            the mouse cursor looks like a cross, "+".
  184.  
  185.                         o  The next line (line 21) is used for the
  186.                            menu options.  In this area, the mouse
  187.                            cursor looks like a pointer, "<-".
  188.  
  189.                         o  The next two lines (lines 22 & 23) are
  190.                            the status lines.  The mouse cursor
  191.                            is not used in this area.
  192.  
  193.                         o  The next line (line 24) is used as a
  194.                            message/prompt area.  The mouse cursor
  195.                            is not used in this area.
  196.  
  197.  
  198.         4.3     USER INPUT
  199.  
  200.                 There are two ways to input information into the
  201.                 computer:
  202.  
  203.                         o  Keyboard input is solicited by displaying
  204.                            prompts that end in a colon, ":", or by
  205.                            indicating that a key is to be pressed.
  206.  
  207.                         o  Mouse input is solicited by displaying
  208.                            prompts that end in a greater than sign,
  209.                            ">", or by indicating that a button is to
  210.                            be pressed.  The LEFT MOUSE BUTTON (LMB)
  211.                            is used as the main selection button, and
  212.                            the RIGHT MOUSE BUTTON (RMB) is used to
  213.                            pick alternative selections or to cancel.
  214.  
  215.  
  216.  
  217.  
  218.       DRAW-2D: A 2-D GRAPHICS EDITOR                            Page 6
  219.  
  220.  
  221.         5.0     GRAPHIC OBJECTS
  222.  
  223.                 Graphic objects are the items to be operated
  224.                 on by the graphics editor.  The following
  225.                 basic objects are selectable with this software:
  226.  
  227.                         1) POINT
  228.                         2) LINE
  229.                         3) VERTICAL LINE
  230.                         4) HORIZONTAL LINE
  231.                         5) BOX or RECTANGLE
  232.                         6) CIRCLE
  233.  
  234.                 These simple objects can be used to create more
  235.                 complex drawing objects.
  236.  
  237.                 All objects can be defined by one or more points.
  238.                 Points are selected by using the Mouse cursor and
  239.                 buttons.  POINTS can be selected by moving the
  240.                 Mouse cursor to the desired position and pressing
  241.                 the LEFT MOUSE BUTTON (LMB).  LINES are selected using
  242.                 the LMB to select the endpoints of the line.
  243.                 The opposite corners of a BOX are selected using
  244.                 the LMB.  The center point and a point on the
  245.                 circumference of the circle are selected using the LMB.
  246.                 A LINE, BOX, or CIRCLE may be cancelled after the
  247.                 first point is selected by using the RMB or by
  248.                 moving the mouse cursor into the Menu line and
  249.                 pressing either mouse button.
  250.  
  251.                 The active graphic object is selected by picking
  252.                 'OBJECT' from the TOP MENU and then picking the
  253.                 appropriate object from the OBJECT Sub-Menu.
  254.                 The active object type is displayed in the status
  255.                 line.  Objects may be drawn while at any menu level.
  256.                 Objects are stored in a memory array until they are
  257.                 saved to disk.
  258.  
  259.  
  260.  
  261.  
  262.  
  263.       DRAW-2D: A 2-D GRAPHICS EDITOR                            Page 7
  264.  
  265.  
  266.         6.0     GRAPHIC OPERATIONS
  267.  
  268.                 Graphic operations are the transformations which
  269.                 can be applied to a graphic object.  Graphic
  270.                 operations fall into three general classes:
  271.  
  272.                         1.  Operations that affect how the world
  273.                             is viewed.
  274.  
  275.                         2.  Operations that affect or transform
  276.                             objects within the world.
  277.  
  278.                         3.  Utility operations that involve the
  279.                             printing, saving, and loading of
  280.                             graphic objects.  These functions
  281.                             will be covered in Section 7.0.
  282.  
  283.                 All operations may be selected from the TOP MENU
  284.                 or by picking options from the OPER-1 or OPER-2
  285.                 Sub-menus.  Menu selections can be made by using
  286.                 either Mouse button.
  287.  
  288.                 You may also select which graphic objects are affected
  289.                 by transformation operations.  Graphic objects may
  290.                 be selected in one of three ways:
  291.  
  292.                         1.  OBJECT MODE  --  only one selected object
  293.                                              will be affected
  294.  
  295.                         2.  AREA MODE    --  all objects within a
  296.                                              selected area are affected
  297.  
  298.                         3.  DRAWING MODE --  all objects in the current
  299.                                              drawing are affected
  300.  
  301.                 The currently active operation MODE is displayed in the
  302.                 status line.
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.       DRAW-2D: A 2-D GRAPHICS EDITOR                            Page 8
  312.  
  313.  
  314.         6.0     GRAPHIC OPERATIONS  (continued)
  315.  
  316.  
  317.                 6.1  OPERATIONS THAT AFFECT THE WORLD
  318.  
  319.                 6.1.1  ZOOM-IN
  320.                 This operation allows a closer view of a specific
  321.                 part of the world.  The corners of the viewing
  322.                 area are indicated by using the LMB.  The screen
  323.                 scale factor is changed by this command and displayed
  324.                 on the status line.
  325.  
  326.                 6.1.2  ZOOM-OUT
  327.                 This operation restores the original view of
  328.                 the world before any ZOOM-IN operations were
  329.                 used.  The screen scale factor is also changed.
  330.  
  331.                 6.1.3  PAN
  332.                 This operation allows a view of different parts of
  333.                 the world.  This feature makes it possible to create
  334.                 a drawing which is larger than the screen area.
  335.  
  336.  
  337.                 6.2  OPERATIONS THAT TRANSFORM OBJECTS
  338.  
  339.                 6.2.1  SCALE
  340.                 This operation provides the option of expanding
  341.                 or shrinking the size of an object about any
  342.                 selected reference point.  A scale factor must
  343.                 be entered from the keyboard.  The scale factor
  344.                 will affect the x and y values equally.
  345.  
  346.                 6.2.2  ROTATE
  347.                 This operation provides the option of rotating
  348.                 an object about any selected reference point.
  349.                 A rotation angle in degrees must be entered
  350.                 from the keyboard.  A positive angle will cause
  351.                 a counterclockwise rotation and a negative angle
  352.                 will cause a clockwise rotation.
  353.  
  354.                 6.2.3  X-LATE
  355.                 This operation will move any object from a location
  356.                 to any other location.  The object is moved within
  357.                 the current world.
  358.  
  359.                 6.2.4  ERASE
  360.                 This operation will delete any object or group
  361.                 of objects from the drawing.
  362.  
  363.  
  364.  
  365.       DRAW-2D: A 2-D GRAPHICS EDITOR                            Page 9
  366.  
  367.  
  368.         7.0     UTILITY OPERATIONS
  369.  
  370.                 7.1  MERGE
  371.                 The merge operation allows multiple drawings to be
  372.                 combined.  The operation will not be accomplished if
  373.                 either the merge file is not available or there is
  374.                 not enough memory space for the additional objects.
  375.  
  376.                 7.2  RE-DRAW
  377.                 Many of the operations include a screen re-draw.
  378.                 However, a separate re-draw operation may be
  379.                 desirable to remove construction marks.
  380.  
  381.                 7.3  LOAD
  382.                 Drawing files may be loaded from disk to memory by
  383.                 using this option.  You will first be asked
  384.                 whether or not to save the current drawing.
  385.                 You may create an entirely new drawing by entering
  386.                 a name which is not on the current list.
  387.  
  388.                 7.4  SAVE
  389.                 You will have the option of saving the current
  390.                 drawing to the current default filename or any
  391.                 other valid filename of your choice.  You may
  392.                 save the entire drawing or only a portion of the
  393.                 drawing depending on the current MODE.
  394.  
  395.                 7.5  PRINT
  396.                 The print option will allow you to obtain a
  397.                 hardcopy of your 2-D drawing on any Epson or
  398.                 compatible printer.  Only B/W output is supported.
  399.  
  400.  
  401.  
  402.  
  403.       DRAW-2D: A 2-D GRAPHICS EDITOR                            Page 10
  404.  
  405.  
  406.         8.0     CONFIGURATION OPTIONS
  407.  
  408.                 8.1  BELL ON/OFF
  409.                 The terminal bell for input prompts may be toggled
  410.                 on and off.  The terminal bell will sound for error
  411.                 conditions even if the BELL is in the OFF mode.  The
  412.                 bell status for input prompts is displayed on the
  413.                 status line.
  414.  
  415.                 8.2  COLOR
  416.                 Up to 16 foreground colors may be selected by using
  417.                 color codes 0-15.  However, only one foreground color
  418.                 may be active at any one time.  The default is a
  419.                 white foreground on a black background.
  420.  
  421.                 8.3  CIRCLE SEGMENTS
  422.                 Circles are drawn with line segments.  The circle will
  423.                 be rounder looking if more line segments are used.
  424.                 However, the drawing time will increase as the number
  425.                 of line segments increases.  The number of line
  426.                 segments for circles (LCIR) is displayed on the
  427.                 status line.
  428.  
  429.                 8.4  CONTINUOUS LINES
  430.                 Normally two endpoints must be specified for each
  431.                 line drawn.  However, in continuous line mode,
  432.                 the last endpoint of the previous line is used
  433.                 as the beginning endpoint for the next line.  The
  434.                 continuous line mode (CLIN) may be toggled on and off
  435.                 and the current status is displayed on the status
  436.                 line.  The continuous line mode only affects
  437.                 normal lines, and not vertical or horizontal lines.
  438.  
  439.                 8.5  SIZE OF THE WORLD
  440.                 The area of the world viewed on the screen may be
  441.                 changed.  This option will also affect the screen
  442.                 scale factor.
  443.  
  444.  
  445.  
  446.  
  447.  
  448.       DRAW-2D: A 2-D GRAPHICS EDITOR                            Page 11
  449.  
  450.  
  451.         9.0     MAKING CHANGES AND RE-COMPILING DRAW-2D
  452.  
  453.                 9.1  NUMBER OF OBJECTS STORED IN MEMORY
  454.                 The software is currently limited to the number of
  455.                 graphic objects which may be used in a single drawing.
  456.                 The limit is set at 500, however, this value may be
  457.                 changed by altering the value of the Constant 'MAXSIZE'
  458.                 in the Pascal source file 'DRAW2D.PAS' and then
  459.                 re-compiling DRAW2D.
  460.  
  461.                 9.2  RE-COMPILING DRAW-2D
  462.                 The program DRAW2D is compiled using TURBO PASCAL V3.0.
  463.                 The built-in TURBO PASCAL graphics procedures PLOT and DRAW
  464.                 are used as the basis for all the graphics operations
  465.                 used in DRAW2D.  No other software packages or graphics
  466.                 support libraries are used by DRAW2D.  DRAW2D may be
  467.                 re-compiled using either the TURBO or TURBO-87 compilers.
  468.                 The compiler options include:
  469.  
  470.                                 C -- for .COM file
  471.                                 A -- max. free dynamic memory = 400
  472.  
  473.  
  474.  
  475.  
  476.  
  477.       DRAW-2D: A 2-D GRAPHICS EDITOR                            Page 12
  478.  
  479.  
  480.        10.0     PROGRAM LIMITATIONS & FUTURE ENHANCEMENTS
  481.  
  482.                10.1  NUMBER OF OBJECTS STORED IN MEMORY
  483.                 The software currently uses a static memory array
  484.                 to store objects.  This limits the complexity of
  485.                 your drawings.  A future enhancement would be to
  486.                 use pointer variables to dynamically allocate
  487.                 objects.  This would allow more complex drawings
  488.                 by using all of available free memory.
  489.  
  490.                10.2  CHARACTER FONTS
  491.                 The program does not currently support character
  492.                 fonts in the graphics drawing.  Therefore, no
  493.                 descriptive text information may be added to
  494.                 the 2-D drawing.  Adding Text objects would be
  495.                 a desirable future enhancement.
  496.  
  497.                10.3  COMPLEX OBJECTS
  498.                 The ability to manipulate an entire set of
  499.                 objects as one complex object would be desirable.
  500.                 This would allow component drawing parts to be
  501.                 constructed and used as single objects in more
  502.                 complex drawings.  Currently a group of objects
  503.                 can be manipulated if they all reside within a
  504.                 common area.
  505.  
  506.                10.4  RUBBING BANDING & GRIDS
  507.                 Rubber-banding and overlay grids are not practical
  508.                 since the basic line drawing routines do not
  509.                 support any type of XORing with current objects
  510.                 on the screen.  This software uses the basic
  511.                 graphic procedures PLOT and DRAW of TURBO PASCAL V3.0.
  512.  
  513.                10.5  ADDITIONAL OBJECTS
  514.                      o  Text
  515.                      o  Complex objects and symbol libraries
  516.                      o  Polygons
  517.                      o  Arcs
  518.                      o  Ellipses
  519.  
  520.                10.6  ADDITIONAL OPERATIONS
  521.                      o  Copy an object, an area, or the entire drawing.
  522.                      o  Mirror images.
  523.                      o  Different scaling for x & y.
  524.                      o  Object and polygon fill.
  525.  
  526.                10.7  ADDITIONAL FEATURES
  527.                      o  Faster drawing.
  528.                      o  Different line styles.
  529.                      o  Dimensioning.
  530.                      o  Calculate the length and areas of objects.
  531.                      o  Define fill patterns.
  532.                      o  Pointer variables for storing objects.
  533.  
  534.        ** Please call Dave Powers at 906-249-3205 regarding any changes
  535.           you have added or would like to see added to DRAW-2D.
  536. ·xINSLINE x